package com.qa.dom.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 * 套餐表
 * </p>
 *
 * @author cxj
 * @since 2018-04-24
 */
public class Packagetable extends Model<Packagetable> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 时长
     */
	@TableField("time_length")
	private Float timeLength;
    /**
     * 有效期
     */
	@TableField("effective_time")
	private Integer effectiveTime;
    /**
     * 原价
     */
	@TableField("original_price")
	private BigDecimal originalPrice;
    /**
     * 现价
     */
	@TableField("present_price")
	private BigDecimal presentPrice;
    /**
     * 所属活动
     */
	private String activity;
    /**
     * 封面图
     */
	private String img;
    /**
     * 创建时间
     */
	@TableField("create_date")
	private Date createDate;
    @TableField(exist = false)
    private  Orderform orderform;
    public Orderform getOrderform() {
        return orderform;
    }

    public void setOrderform(Orderform orderform) {
        this.orderform = orderform;
    }


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Float getTimeLength() {
		return timeLength;
	}

	public void setTimeLength(Float timeLength) {
		this.timeLength = timeLength;
	}

	public Integer getEffectiveTime() {
		return effectiveTime;
	}

	public void setEffectiveTime(Integer effectiveTime) {
		this.effectiveTime = effectiveTime;
	}

	public BigDecimal getOriginalPrice() {
		return originalPrice;
	}

	public void setOriginalPrice(BigDecimal originalPrice) {
		this.originalPrice = originalPrice;
	}

	public BigDecimal getPresentPrice() {
		return presentPrice;
	}

	public void setPresentPrice(BigDecimal presentPrice) {
		this.presentPrice = presentPrice;
	}

	public String getActivity() {
		return activity;
	}

	public void setActivity(String activity) {
		this.activity = activity;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Packagetable{" +
			", id=" + id +
			", timeLength=" + timeLength +
			", effectiveTime=" + effectiveTime +
			", originalPrice=" + originalPrice +
			", presentPrice=" + presentPrice +
			", activity=" + activity +
			", img=" + img +
			", createDate=" + createDate +
			"}";
	}
}
